<template>
  <el-tabs v-model="activeName" @tab-click="tabsClick">
    <el-tab-pane :label="t('keys.IdentityManagement')" name="1"></el-tab-pane>
    <el-tab-pane :label="t('keys.Join_Enterprise_Records')" name="2"></el-tab-pane>
  </el-tabs>
  <identity-management-table v-if="activeName == '1'"></identity-management-table>
  <business-record-table v-if="activeName == '2'"></business-record-table>
</template>
<script setup>
import { ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { useI18n } from 'vue-i18n'
import identityManagementTable from './components/identityManagementTable.vue'
import businessRecordTable from './components/businessRecordTable.vue'
let route = useRoute()
let router = useRouter()
const { t } = useI18n() // 中英文
const activeName = ref('1')
activeName.value = route.query.activeName || '1'
const tabsClick = (tab, event) => {
  router.replace({
    path: '/newIdentityManagement',
    query: {
      activeName: tab.props.name
    }
  })
}
</script>
